
// #ifndef VUE3
import Vue from 'vue'
import App from './App'

Vue.config.productionTip = false

App.mpType = 'app'

const app = new Vue({
    ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
import App from './App.vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
  methods: {
      navigateTo(page) {
        // 根据点击的导航项跳转到对应页面
        switch (page) {
          case 'home':
            uni.navigateTo({ url: '/pages/home/home' });
            break;
          case 'category':
            uni.navigateTo({ url: '/pages/category/category' });
            break;
          case 'cart':
            uni.navigateTo({ url: '/pages/cart/cart' });
            break;
          case 'profile':
            uni.navigateTo({ url: '/pages/profile/profile' });
            break;
          default:
            break;
        }
      }
    }
}
// #endif